import { useAccount } from "../store/account"

export const usePermission = (permit)=>{
  // permit = ['super','admin','normal']
  const account = useAccount()
  const role = account.permitData.role  //当前已登录用户的角色代号:super/admin/normal
  let bool = permit.includes(role)
  return {
    canUse:bool
  }
}